Release 10.1A: OpenEdge Data Management:
SQL Reference
ROUND
Returns the rounded value of a numeric expression.
Syntax
Example
This example illustrates four calls to the
ROUNDfunction:
In each case the
num_expressionis2953861.8320. In the first call therounding_factoris2, in the second call therounding_factoris -2, in the third call therounding_factoris0, and in the fourth call norounding_factoris specified.Notes
num_expressionmust be numeric or must be convertible to numeric.num_expressionmust be one of these supported data types:- If the data type of
num_expressionis not a supported type,ROUNDreturns an error message.- The
num_expressionis rounded to the next higher digit when:- The
num_expressionis rounded to the next lower digit when:rounding_factoris an integer between –32 and +32 inclusive, and indicates the digit position to which you want to roundnum_expression. Figure 1 illustrates how the digit positions are numbered. In the figure, thenum_expressionis2953861.8320.Figure 1: ROUND digit positions
![]()
- If you do not specify a
rounding_factor, the function roundsnum_expressionto digit 0 (the ones place).- To round to the right of the decimal point, specify a positive
rounding_factor.- To round to the left of the decimal, specify a negative
rounding_factor.Compatibility
Progress extension
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |